/*
 * 
 * 
 * 
 */
package com.hboxs.asl.service.impl;

import com.hboxs.asl.Page;
import com.hboxs.asl.Pageable;
import com.hboxs.asl.dao.BankCardDao;
import com.hboxs.asl.entity.BankCard;
import com.hboxs.asl.entity.Member;
import com.hboxs.asl.service.BankCardService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * Service - 银行卡
 */
@Service("bankCardServiceImpl")
public class BankCardServiceImpl extends BaseServiceImpl<BankCard, Long> implements BankCardService {

    @Resource(name = "bankCardDaoImpl")
    private BankCardDao bankCardDao;

    @Resource(name = "bankCardDaoImpl")
    public void setBaseDao(BankCardDao bankCardDao) {
        super.setBaseDao(bankCardDao);
    }


    @Override
    public BankCard findBankCardByNumber(String number) {
        return bankCardDao.findBankCardByNumber(number);
    }

    @Transactional(readOnly = true)
    public Page<BankCard> findPage(Member member, Pageable pageable) {
        return bankCardDao.findPage(member, pageable);
    }
}
